import request from '@/api/request.js'
import { formatGetUri } from '@/api/common.js'

const authentication = {}
const PORT1 = 'auhtority'
const BaseURI = "/market";
//账户密码登录
authentication.login = params => request.globalRequest(`/login`, 'POST', params, request.GUEST)
//手机登录
authentication.loginMobile = params => request.globalRequest(`/loginMobile`, 'POST', params, request.GUEST)
//登录短信
authentication.loginMobileSend = params => request.globalRequest(`/loginMobileSend`, 'POST', params, request.GUEST)

//微信登录
authentication.loginWechat = params => request.globalRequest(`/login-wechat`, 'POST', params, request.GUEST)
authentication.loginWechatCode = params => request.globalRequest(`/login-wechat-code`, 'POST', params, request.GUEST)
//微博登录
authentication.loginWeibo = params => request.globalRequest(`/login-weibo`, 'POST', params, request.GUEST)
//QQ登录
authentication.loginTencent = params => request.globalRequest(`/login-tencent`, 'POST', params, request.GUEST)
//支付宝登录
authentication.loginAlipay = params => request.globalRequest(`/login-alipay`, 'POST', params, request.GUEST)

//手机登录
authentication.registerEmail = params => request.globalRequest(`/register-email`, 'POST', params, request.GUEST)
//手机登录
authentication.submitRegister = params => request.globalRequest(`/register`, 'POST', params, request.GUEST)
//用户信息
authentication.getUserInfo = params => request.globalRequest(`/getUserInfo`, 'POST', params, request.USER)

export default authentication